<!DOCTYPE html>
<html lang="zh-cn">
	<head>
  		<meta charset="utf-8">
      	<meta http-equiv="X-UA-Compatible" content="IE=edge">
      	<link rel="shortcut icon" href="favicon.ico"/>
      	<title>用户登录 - {$CONF['mallTitle']}</title>
      	<meta name="keywords" content="{$CONF['mallKeywords']}" />
      	<meta name="description" content="{$CONF['mallDesc']},用户登录" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/common.css">
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/base.css" />
		<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/head.css" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/login.css">
     	
   	</head>
   	<body>
   		<include file="./Apps/Home/View/default/header_common.html" />
   			<div class='wst-login'>
		    	<div class="w1" id="entry">
		    		<?php if($info){ ?>
		        		<div class="wst-wx-info">
		        			&nbsp; <img src="{$info['userPhoto']}">
		        			&nbsp;Hi, {$info['userName']} 欢迎来{$CONF['mallName']}
		        		</div>
		        	<?php } ?>
		        	<div class="mc " id="bgDiv" style="position:relative; height:600px;">
		        	<div class="wst-wx-bin">
		        		<div class="bin selected" onclick="toChoice(this,1);">已有帐号，请绑定</div>
		        		<div class="bin" onclick="toChoice(this,0);">没有帐号，请完善资料</div>
		        	</div>
		            <div class="form form2" id="binding">
		                <div class="item fore1" style="position:relative;">
		                    <span>用户名/手机号/邮箱</span><span id="errmsg" style="color:red;position:absolute;top:0px;left:100px;"></span>
		                    <div class="item-ifo">
		                        <input id="loginName2" name="loginName2" class="text"  tabindex="1" value="{$loginName}" autocomplete="off" type="text"/>
		                        <div class="i-name ico"></div>                       
		                    </div>
		                </div>               
		                <div class="item fore2">
		                    <span>密码</span>
		                    <div class="item-ifo">                       
		                        <input id="loginPwd" name="loginPwd" class="text" tabindex="2" autocomplete="off" type="password"/>                      
		                        <div class="i-pass ico"></div>            
		                    </div>
		                </div>
		                <div class="item fore3">
		                    <span>验证码</span>
		                    <div class="item-ifo">
		                        <input id="verify" style="ime-mode:disabled" name="verify" class="text text-1" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
			                   
			                    <div>
			                    <label class="img">
			                		<img class='verifyImg' style="height: 55px;width:175px;" src='{$WST_STYLE}/images/clickForVerify.png' title='刷新验证码' onclick='javascript:getVerify()'/> 
								</label>      	
			              		</div>
			              		<div class="wst-clear;"></div>
			              		<label class="ftx23" style="  position: relative;top: -20px;">&nbsp;看不清？<a href="javascript:getVerify()" class="flk13">换一张</a></label>
		                    </div>
		                </div>
		                <div class="wst-clear"></div>
		                <div class="item fore4">
		                    <div class="item-ifo">
		                    	<div>
			                        <input class="checkbox" id="rememberPwd" name="rememberPwd" checked="checked" type="checkbox"/>
			                        <label class="mar">记住密码</label>
		                        </div>
		                    </div>
		            	</div>
		                <div class="item login-btn2013">
		                    <input class="btn-img btn-binding" id="loginsubmit" value="立即绑定" tabindex="8" onclick="checkLoginInfo();"/>
		                </div>
		            </div>
		           <div class="form form2 hide" id="register">
		           <form id="register" method="post" autocomplete="off">
		           	    <input name="nameType" id="nameType" value="2"  type="hidden" />
		                <div class="item fore1" style="position:relative;">
		                    <span>用户名/手机号/邮箱</span>
		                    <div class="item-ifo">
		                        <input id="loginName" name="loginName" class="text"  tabindex="1" autocomplete="off" style="ime-mode:disabled;" onblur="onblurName(this);" onkeypress="return WST.isUserName(event)" onfocus="onfocusName(this);" type="text"/>
		                        <div class="i-name ico"></div>                      
		                    </div>
		                    <div id="loginNameTip" style="display: inline-block; position: absolute;top:-1px; right:20px;"></div>
							<div id="namelist"></div>
		                </div>               
		                <div class="item fore2">
		                    <span>请设置密码</span>
		                    <div class="item-ifo">                       
		                        <input id="loginPwd2" name="loginPwd2" class="text" tabindex="2" autocomplete="off" type="password"/>                      
		                        <div class="i-pass ico"></div>            
		                    </div>
		                </div>
		                <div class="item fore2">
		                    <span>请确认密码</span>
		                    <div class="item-ifo">                       
		                        <input id="reUserPwd" name="reUserPwd" class="text" tabindex="2" autocomplete="off" type="password"/>                      
		                        <div class="i-pass ico"></div>            
		                    </div>
		                </div>
		                <div class="item fore3" id="authcodeDiv">
		                    <span>验证码</span>
		                    <div class="item-ifo">
		                        <input id="authCode" style="ime-mode:disabled" name="authCode" class="text text-1" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
			                    <div>
			                    <label class="img">
			                		<img class='verifyImg' style="height: 55px;width:175px;" src='{$WST_STYLE}/images/clickForVerify.png' title='刷新验证码' onclick='javascript:getVerify()'/> 
								</label>      	
			              		</div>
			              		<div class="wst-clear;"></div>
			              		<label class="ftx23" style="  position: relative;top: -20px;">&nbsp;看不清？<a href="javascript:getVerify()" class="flk13">换一张</a></label>
		                    </div>
		                </div>
		                <div class="wst-clear"></div>
		                <div class="item fore3 hide" id="mobileCodeDiv">
		                    <span>短信验证码</span>
		                    <div class="item-ifo">
		                        <input id="mobileCode" style="ime-mode:disabled" name="mobileCode" class="text text-1" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
			                    <div>
			                    <label class="img">
				                    <a class="wst-wx-btn" href="javascript:void(0);" onclick="getVerifyCode();" id="sendMobileCode">
		                                <p id="timeTips">获取短信验证码</p>
		                           	</a>
								</label>      	
			              		</div>
			              		<div class="wst-clear;"></div>
		                    </div>
		                </div>
		                <div class="wst-clear"></div>
		                <div class="item fore4">
		                    <div class="item-ifo">
		                    	<div>
			                        <label><input class="checkbox" id="protocol" name="protocol" type="checkbox"/>我已阅读并同意</label>
			                        <a href="javascript:;" class="blue" id="protocolInfo" onclick="showXiey();">《用户注册协议》</a>                       
			                        <label id="protocol_error" class="error hide">请接受服务条款</label>
		                        </div>
		                    </div>
		            	</div>
		                <div class="wst-clear"></div>
		                <div class="item login-btn2013">
		                    <input class="btn-img btn-binding" id="registsubmit" type="submit" value="立即注册" tabindex="8" onclick="checkLoginInfo();"/>
		                </div>
		           	</form>
		            </div>
		        </div>
		    </div>
		</div>
		<include file="./Apps/Home/View/default/footer.html" />
		<script src="__PUBLIC__/plugins/formValidator/formValidator-4.1.3.js"></script>
      	<script src="__PUBLIC__/js/common.js"></script>
      	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/common.js"></script>
      	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/userlogin.js"></script>
      	<script>
      	$(function(){
      		getVerify();
      		 $.formValidator.initConfig({
      			   theme:'Default',mode:'AutoTip',formID:"register",debug:true,submitOnce:true,onSuccess:function(){
      					if(jQuery("#loginNameTip").attr("class")=="onCorrect"){
      					
      						regist();
      					}
      				    return false;
      				},onerror:function(msg){
      				var uname = jQuery("#loginName").val();		
      				if(uname=="邮箱/用户名/手机号"){
      					jQuery("#loginNameTip").removeClass();			
      					jQuery("#loginNameTip").addClass("onError");
      					jQuery("#loginNameTip").html("请输入邮箱/用户名/手机号");
      				}
      			}});
      		
      		$("#loginPwd2").formValidator({
      			onShow:"",onFocus:"6-20位之间"
      			}).inputValidator({
      				min:6,max:20,onError:"6-20位之间"
      			});
      		$("#reUserPwd").formValidator({
      			onShow:"",onFocus:"密码不一致。",onCorrect:"密码一致"
      			}).inputValidator({
      				min:6,max:20,onError:"6-20位之间"
      			}).compareValidator({
      				desID:"loginPwd2",operateor:"=",onError:"两次密码不同。"
      			});
      		$('#loginPwd2Tip').css({
      			"position":"absolute",
      			"top":"-22px",
      			"left":"65px"
      		});
      		$('#reUserPwdTip').css({
      			"position":"absolute",
      			"top":"-22px",
      			"left":"65px"
      		});
      		loadSearchList("loginName","namelist");

      	});
      	</script>
   	</body>
</html> 